﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterPage.Master" AutoEventWireup="true"
    CodeBehind="oferta.aspx.cs" Inherits="TodoSuspensionWeb.oferta" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            height: 26px;
        }
        .style2
        {
            height: 35px;
        }
        .style6
        {
        }
        .style7
        {
            width: 107px;
        }
        .style8
        {
            width: 164px;
        }
        .style9
        {
        }
        .style11
        {
            width: 137px;
        }
        .style12
        {
            width: 92px;
        }
        .style13
        {
            width: 71px;
        }
        .style14
        {
            width: 153px;
        }
        .style15
        {
            width: 175px;
        }
        .style16
        {
            width: 103px;
        }
        .style17
        {
            width: 19px;
        }
        .style19
        {
            height: 26px;
            width: 19px;
        }
    .style20
    {
        height: 25px;
        text-align: left;
    }
    .style21
    {
        height: 25px;
        width: 19px;
    }
    .style23
    {
        height: 26px;
        width: 241px;
    }
    .style24
    {
        height: 26px;
        width: 84px;
        text-align: left;
    }
    .style25
    {
        height: 25px;
        text-align: left;
        width: 84px;
    }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
    <table >
        <tr>
            <td valign="top">
                <table>
                    <tr>
                        <td style="text-align: center; font-weight: 700; text-decoration: underline;
                            font-size: large" class="style17">
                            &nbsp;</td>
                        <td style="text-align: center; font-weight: 700; text-decoration: underline;
                            font-size: large" colspan="2">
                            OFERTAS
                        </td>
                    </tr>
                    <tr>
                        <td class="style17">
                            &nbsp;</td>
                        <td colspan="2">
                        </td>
                    </tr>
                    <tr>
                        <td class="style21">
                            </td>
                        <td class="style25">
                            Estado:</td>
                        <td class="style20">
                            <asp:DropDownList ID="ddl_esatdo_oferta" runat="server" Height="25px" 
                                Width="150px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style19">
                            </td>
                        <td class="style24">
                            Fecha Desde:
                        </td>
                        <td class="style23">
                            <asp:TextBox ID="txtFechaBusqueda" runat="server" TextMode="Date" Height="25px" 
                                TabIndex="1" Width="150px"></asp:TextBox>
                            <br />
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td class="style19">
                            &nbsp;</td>
                        <td class="style1" colspan="2">
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnBuscarOferta" runat="server" Text="BUSCAR" Width="150px" 
                                onclick="btnBuscarOferta_Click" Height="25px" TabIndex="2" 
                                CausesValidation="False" />
                        &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style19">
                            &nbsp;</td>
                        <td class="style1" colspan="2">
                        <div style="width:760px; overflow-x:scroll">
                <asp:GridView ID="gdv_oferta" runat="server" AutoGenerateColumns="False" Style="text-align: center"
                    AllowPaging="True" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None"
                    BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" PageSize="5"
                    OnRowDeleting="gdv_oferta_RowDeleting"
                                onselectedindexchanged="gdv_oferta_SelectedIndexChanged" Width="760px" >
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:CommandField ShowSelectButton="True" />
                        <asp:CommandField ShowDeleteButton="True" />
                        <asp:ImageField DataImageUrlField="idOferta" 
                            DataImageUrlFormatString="ImageCSharp.aspx?ImageID={0}" HeaderText="IMAGEN"
                            ControlStyle-Width = "100" ControlStyle-Height = "100">
                        </asp:ImageField>
                        <asp:BoundField HeaderText="DESCRIPCION" DataField="descripcion" />
                        <asp:BoundField HeaderText="FECHA DESDE" DataField="fechaDesde"  DataFormatString="{0:d}" />
                        <asp:BoundField HeaderText="FECHA HASTA" DataField="fechaHasta"  DataFormatString="{0:d}" />
                        <asp:BoundField HeaderText="ESTADO" DataField="idEstado" />
                        <asp:BoundField HeaderText="PRECIO ORIGINAL" DataField="precioOriginal" />
                        <asp:BoundField HeaderText="DESCUENTO" DataField="descuento" />
                        <asp:BoundField DataField="precioPromocional" HeaderText="PRECIO PROMOCIONAL" />
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                </asp:GridView>
                </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table style="width:100%;">
                    <tr>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style7">
                            Título *:</td>
                        <td class="style9" colspan="3">
                            <asp:TextBox ID="txtTitulo" runat="server" Width="100%" TabIndex="3" 
                                ValidationGroup="validar" CausesValidation="True"></asp:TextBox>
                        </td>
                        <td class="style6">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtTitulo" ErrorMessage="Titulo Requerido">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style7">
                            Descripción:</td>
                        <td class="style9" colspan="3">
                            <asp:TextBox ID="txtDescripcion" runat="server" Height="57px" 
                                TextMode="MultiLine" Width="100%" style="margin-right: 28px" TabIndex="4" 
                                ValidationGroup="validar"></asp:TextBox>
                        </td>
                        <td class="style6">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                ControlToValidate="txtDescripcion" ErrorMessage="Descripcion Requerida">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style7">
                            Fecha Desde *:</td>
                        <td class="style15">
                            <asp:TextBox ID="txtFechaDesde" runat="server" TextMode="Date" Height="25px" 
                                TabIndex="5" Width="149px" ValidationGroup="validar"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                ControlToValidate="txtFechaDesde" ErrorMessage="Fecha Desde Requerida">*</asp:RequiredFieldValidator>
                        </td>
                        <td class="style8">
                            Fecha Hasta:</td>
                        <td class="style16">
                            <asp:TextBox ID="txtFechaHasta" runat="server" TextMode="Date" Height="25px" 
                                TabIndex="6" Width="150px" ValidationGroup="validar"></asp:TextBox>
                        </td>
                        <td class="style6">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                ControlToValidate="txtFechaHasta" ErrorMessage="Fecha Hasta Requerida">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style7">
                            Estado:</td>
                        <td class="style15">
                            <asp:DropDownList ID="ddlEstado" runat="server" Height="25px" Width="150px" 
                                TabIndex="7" ValidationGroup="validar">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                                ControlToValidate="ddlEstado" ErrorMessage="Estado Requerido">*</asp:RequiredFieldValidator>
                        </td>
                        <td class="style8">
                            Precio Original:</td>
                        <td class="style16">
                            <asp:TextBox ID="txtPrecioOriginal" runat="server" Height="25px" TabIndex="8" 
                                Width="150px" ValidationGroup="validar"></asp:TextBox>
                        </td>
                        <td class="style6">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                ControlToValidate="txtPrecioOriginal" ErrorMessage="Precio Original Requerido">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style7">
                            Descuento:</td>
                        <td class="style15">
                            <asp:TextBox ID="txtDescuento" runat="server" 
                                ontextchanged="txtDescuento_TextChanged" Height="25px" TabIndex="9" 
                                Width="150px" ValidationGroup="validar"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                                ControlToValidate="txtDescuento" ErrorMessage="Descuento Requerido">*</asp:RequiredFieldValidator>
                        </td>
                        <td class="style8">
                            Precio Promocional:</td>
                        <td class="style16">
                            <asp:TextBox ID="txtPrecioPromocional" runat="server" Enabled="False" 
                                Height="25px" TabIndex="10" Width="150px"></asp:TextBox>
                        </td>
                        <td class="style6">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style7">
                            Ruta Imagen:</td>
                        <td class="style6" colspan="3">
                            <asp:FileUpload ID="fileUpload1" runat="server" TabIndex="11" />
                        &nbsp;&nbsp;
                        <br />
                        <asp:Label ID="lblMessage" runat="server" Text=""
                        Font-Names = "Arial"></asp:Label>
                            </td>
                        <td class="style6">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style6" colspan="3">
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                                ShowMessageBox="True" ShowSummary="False" />
                            </td>
                        <td class="style6">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style7">
                            &nbsp;</td>
                        <td class="style6" colspan="3">
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="Button7" runat="server" onclick="Button7_Click" 
                                Text="IMPRIMIR OFERTAS" TabIndex="12" CausesValidation="False" />
                            </td>
                        <td class="style6">
                            &nbsp;</td>
                    </tr>
                    </table>
            </td>
        </tr>
        <tr>
            <td>
                <table style="width:100%;">
                    <tr>
                        <td class="style13">
                            &nbsp;</td>
                        <td class="style13">
                            &nbsp;</td>
                        <td class="style14">
                            <asp:Button ID="btnAgregar" runat="server" Text="AGREGAR" 
                                Width="100px" onclick="btnAgregar_Click" ValidationGroup="validar" />
                        </td>
                        <td class="style11">
                            <asp:Button ID="btnModificar" runat="server" Text="MODIFICAR" Width="100px" 
                                onclick="btnModificar_Click" ValidationGroup="validar" />
                        </td>
                        <td class="style12">
                            <asp:Button ID="btnLimpiar" runat="server" style="margin-left: 34px" 
                                Text="LIMPIAR" Width="100px" onclick="btnLimpiar_Click" 
                                CausesValidation="False" />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
